import request from '@/utils/request';

export default {
  getList() {
    return request({
      method: 'get',
      url: '/member/list'
    })
  },
  // 页码，一页显示数和查询条件
  search(page, size, searchMap) {
    return request({
      method: 'post',
      url: `/member/list/search/${page}/${size}`,
      data: searchMap
    })
  },
  addMember(form) {
    return request({
      method: 'post',
      url: 'member',
      data: form
    })
  },
  getById(id) {
    return request({
      method: 'get',
      url: `member/${id}`
    })
  },
  upDate(form) {
    return request({
      method: 'put',
      url: `member/${form.id}`,
      data: form
    })
  },
  delete(id) {
    return request({
      method: 'delete',
      url: `member/${id}`
    })
  }
}